/*
 * Visual Program Editor
 *
 * packages.h
 */


#ifndef __packages_H__
#define __packages_H__


#include <System.hpp>

/*
typedef PACKAGE void __fastcall (* TRegisterComponentsProc) (const AnsiString Page, const TMetaClass * const * ComponentClasses, const int ComponentClasses_Size);
typedef PACKAGE void __fastcall (* TRegisterNoIconProc) (const TMetaClass * const * ComponentClasses, const int ComponentClasses_Size);
*/

class TPackage
{
public:
    __fastcall TPackage ();
    __fastcall virtual ~TPackage ();

    typedef void __fastcall PACKAGE (* TRegisterProc) ();
    
    unsigned Handle;
    int Flags;
    AnsiString ModuleName;
    AnsiString Description;
    TComponentList * Items;
    
    bool Load (AnsiString FileName);
    bool Unload (bool Force = false);
};


class TPackageList : public TList
{
public:
    static void Init ();
    static void Free ();

    bool Enable (AnsiString ModuleName);
};


extern PACKAGE TPackageList * PackageList;


#endif /* __packages_H__ */
